Integrand size = 23, antiderivative size = 104 \[ \int \sqrt {b \sec (c+d x)} (A+B \sec (c+d x)) \, dx=-\frac {2 b B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 A \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{d}+\frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3872, 3856, 2720, 3853, 2719} \[ \int \sqrt {b \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {2 A \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{d}+\frac {2 B \sin (c+d x) \sqrt {b \sec (c+d x)}}{d}-\frac {2 b B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 3853
Rule 3856
Rule 3872
Rubi steps \begin{align*} \text {integral}& = A \int \sqrt {b \sec (c+d x)} \, dx+\frac {B \int (b \sec (c+d x))^{3/2} \, dx}{b} \\ & = \frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d}-(b B) \int \frac {1}{\sqrt {b \sec (c+d x)}} \, dx+\left (A \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx \\ & = \frac {2 A \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{d}+\frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d}-\frac {(b B) \int \sqrt {\cos (c+d x)} \, dx}{\sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}} \\ & = -\frac {2 b B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 A \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{d}+\frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d} \\ \end{align*}
Time = 0.34 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.70 \[ \int \sqrt {b \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {2 \sqrt {b \sec (c+d x)} \left (-B \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+A \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+B \sin (c+d x)\right )}{d} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 20.63 (sec) , antiderivative size = 470, normalized size of antiderivative = 4.52
method | result | size |
parts | \(-\frac {2 i A \left (\cos \left (d x +c \right )+1\right ) \sqrt {b \sec \left (d x +c \right )}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}{d}+\frac {2 B \left (i \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )^{2}-i \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )^{2}+2 i \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )-2 i \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )+i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )-i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )+\sin \left (d x +c \right )\right ) \sqrt {b \sec \left (d x +c \right )}}{d \left (\cos \left (d x +c \right )+1\right )}\) | \(470\) |
default | \(-\frac {2 \left (i A \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )^{2}-i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )^{2}+i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )^{2}+2 i A \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )-2 i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )+2 i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )+i A \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-B \sin \left (d x +c \right )\right ) \sqrt {b \sec \left (d x +c \right )}}{d \left (\cos \left (d x +c \right )+1\right )}\) | \(582\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.11 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.35 \[ \int \sqrt {b \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {-i \, \sqrt {2} A \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} A \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - i \, \sqrt {2} B \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + i \, \sqrt {2} B \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, B \sqrt {\frac {b}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{d} \]
[In]
[Out]
\[ \int \sqrt {b \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\int \sqrt {b \sec {\left (c + d x \right )}} \left (A + B \sec {\left (c + d x \right )}\right )\, dx \]
[In]
[Out]
\[ \int \sqrt {b \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} \sqrt {b \sec \left (d x + c\right )} \,d x } \]
[In]
[Out]
\[ \int \sqrt {b \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} \sqrt {b \sec \left (d x + c\right )} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sqrt {b \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\int \left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,\sqrt {\frac {b}{\cos \left (c+d\,x\right )}} \,d x \]
[In]
[Out]